Skip to content

Added new 'jerry_value_instanceof' API function. #2723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

LaszloLango
Copy link
Contributor

JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]

@LaszloLango LaszloLango added api Related to the public API development Feature implementation labels Jan 22, 2019

**Summary**

Returns whether the given `jerry_value_t` is an instance of the given prototype.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there any difference between the es5.1 vs es2015 instanceof internal workings? Could that affect the api workings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not affect the api workings, but may affect the internal workings (e.g.: instance of classes).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes are simple functions, the only specializations they have is a bytecode status flag, so I think it couldn't have any affect on it.

@LaszloLango
Copy link
Contributor Author

@galpeter @rerobika thanks for the reviews. PR is updated.

JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
Copy link
Member

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (informal)

@LaszloLango
Copy link
Contributor Author

Closing PR to prevent merging. Let's discuss and make decision on #2746 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the public API development Feature implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants